home *** CD-ROM | disk | FTP | other *** search
/ The Book of Tells / The Book of Tells.iso / vidgal.dir / 00069_Script_69 < prev    next >
Text File  |  1994-09-22  |  9KB  |  335 lines

  1. on startMovie
  2.   put "0/0" into field "time" 
  3.   set the puppet of sprite 20 to TRUE
  4.   set the puppet of sprite 23 to TRUE
  5.   set the puppet of sprite 24 to TRUE
  6.   set the puppet of sprite 25 to TRUE
  7.   set the puppet of sprite 26 to TRUE
  8.   set the puppet of sprite 27 to TRUE
  9.   set the puppet of sprite 28 to TRUE
  10.   set the puppet of sprite 29 to TRUE
  11.   set the puppet of sprite 30 to TRUE
  12.   set the puppet of sprite 34 to TRUE
  13.   set the puppet of sprite 43 to TRUE
  14.   
  15.   set the puppet of sprite 44 to TRUE
  16.   set the visible of sprite 28 to FALSE
  17.   set the visible of sprite 29 to FALSE
  18.   set the visible of sprite 30 to FALSE
  19.   set the visible of sprite 34 to FALSE
  20.   set the locH of sprite 28 to -200
  21.   set the locH of sprite 29 to -200
  22.   set the locH of sprite 30 to -200
  23.   set the scriptText of cast 29 = the scriptText of cast 23
  24.   set the scriptText of cast 31 = the scriptText of cast 24
  25.   set the scriptText of cast 32 = the scriptText of cast 25
  26.   set the itemDelimiter = "~"
  27.   
  28.   global lineNum, class, oldInfoBox,audioClip,movieClip,movieSpriteNum, mStartTime, mStopTime
  29.   
  30.   put word 1 of field "Title" into infoBox
  31.   put word 2 of field "Title" after infoBox
  32.   put the number of lines in field infoBox into numberLines
  33.   
  34.   put line (numberLines - 8) of field infoBox into audioClip
  35.   put line (numberLines - 10) of field infoBox into movieClip
  36.   put line (numberLines - 11) of field infoBox into mStopTime
  37.   put line (numberLines - 12) of field infoBox into mStartTime
  38.   
  39.   
  40.   -- This is the sprite where the movie is
  41.   set movieSpriteNum=7
  42.   puppetSprite movieSpriteNum,TRUE
  43.   unload
  44.   
  45. end startMovie
  46.  
  47.  
  48. -- ************************************************
  49. -- Name: resetMovieToStart
  50. -- Description:
  51. -- ************************************************
  52. on resetMovieToStart
  53.   puppetSprite (23), TRUE
  54.   --  set the castNum of sprite (23) to 138
  55.   --  updateStage
  56.   --  
  57.   --  
  58.   --  startTimer
  59.   --  repeat while the timer < 5
  60.   --  end repeat
  61.   --  
  62.   --  
  63.   --  set the castNum of sprite (23) to 139
  64.   --  updateStage
  65.   --  
  66.   --  startTimer
  67.   --  repeat while the timer < 5
  68.   --  end repeat
  69.   --  
  70.   set the castNum of sprite (23) to 140
  71.   updateStage  
  72.   
  73.   startTimer
  74.   repeat while the timer < 5
  75.   end repeat
  76.   
  77.   --    turn off pause and play
  78.   
  79.   puppetSprite (20), TRUE
  80.   set the castNum of sprite (20) to 125
  81.   updateStage
  82.   
  83.   puppetSprite (24), TRUE
  84.   set the castNum of sprite (24) to 121
  85.   updateStage
  86.   
  87.   global movieSpriteNum,mStartTime,moving
  88.   set moving=FALSE
  89.   
  90.   set the movieRate of sprite movieSpriteNum to 0
  91.   set the movieTime of sprite movieSpriteNum = mStartTime 
  92.   
  93.   set the loch of sprite 46 to  -100
  94.   set the locv of sprite 46 to  -100
  95.   set the loch of sprite 47 to  -100
  96.   set the locv of sprite 47 to  -100
  97.   
  98. end resetMovieToStart
  99.  
  100.  
  101. -- ************************************************
  102. -- Name: divide
  103. -- Description:
  104. -- ************************************************
  105. on divide a,b
  106.   if b<>0 then
  107.     return integer( ((a+0.0) / (b+0.0)) - 0.49 )
  108.   else
  109.     return 0
  110.   end if
  111. end divide 
  112.  
  113.  
  114.  
  115. -- ************************************************
  116. -- Name: setTime
  117. -- Description:
  118. -- ************************************************
  119. on setTime
  120.   global movieSpriteNum,mStartTime,mStopTime
  121.   set tmpc=string(divide( ((the movieTime of sprite movieSpriteNum)-mStartTime),12 )+1 )
  122.   set tmpm=string(divide( (mStopTime-mStartTime),12)+1)
  123.   --  put (the movieTime of sprite movieSpriteNum)-mStartTime&"/"&(mStopTime-mStartTime)&" --"&tmps into field "time" 
  124.   put tmpc&"/"&tmpm into field "time" 
  125.   --  put the movieTime of sprite movieSpriteNum into field "test"
  126. end setTime
  127.  
  128.  
  129.  
  130. -- ******************************************************
  131. -- Name: buttonAction
  132. -- Description: 
  133. --                      
  134. -- Example: buttonAction(TRUE)
  135. -- ******************************************************
  136. on buttonAction silent
  137.   
  138.   global activated
  139.   set activated = TRUE
  140.   
  141.   if not(silent=TRUE) then sound playfile 1, "MouseDown"
  142.   
  143.   set ButtonUpName = the name of cast (the castnum of sprite the ClickOn)
  144.   
  145.   
  146.   set tmp1=ButtonUpName&"1"
  147.   set tmp2=ButtonUpName&"2"
  148.   set tmp3=ButtonUpName&"3"
  149.   set ButtonDownName = ButtonUpName&"3"
  150.   
  151.   set the castnum of sprite the ClickOn = the number of cast tmp1
  152.   updatestage
  153.   startTimer
  154.   repeat while the timer < 5
  155.   end repeat
  156.   
  157.   set the castnum of sprite the ClickOn = the number of cast tmp2
  158.   updatestage
  159.   startTimer
  160.   repeat while the timer < 5
  161.   end repeat
  162.   
  163.   set the castnum of sprite the ClickOn = the number of cast tmp3
  164.   updatestage
  165.   startTimer
  166.   repeat while the timer < 5
  167.   end repeat
  168.   
  169.   set buttonOn=TRUE
  170.   repeat while the stillDown = TRUE
  171.     
  172.     if rollover (the clickOn) = TRUE then
  173.       if buttonOn=FALSE then
  174.         set buttonON=TRUE
  175.         set the castnum of sprite the ClickOn = the number of cast tmp1
  176.         updatestage
  177.         startTimer
  178.         repeat while the timer < 5
  179.         end repeat
  180.         
  181.         set the castnum of sprite the ClickOn = the number of cast tmp2
  182.         updatestage
  183.         startTimer
  184.         repeat while the timer < 5
  185.         end repeat
  186.         
  187.         set the castnum of sprite the ClickOn = the number of cast tmp3
  188.         updatestage
  189.         startTimer
  190.         repeat while the timer < 5
  191.         end repeat
  192.       else
  193.         
  194.         set activated = TRUE
  195.         set the castnum of sprite the ClickOn = the number of cast ButtonDownName
  196.         updatestage
  197.       end if
  198.       
  199.     else  
  200.       set buttonOn=FALSE
  201.       set activated = FALSE
  202.       set the castnum of sprite the ClickOn = the number of cast ButtonUpName
  203.       updatestage
  204.       
  205.     end if
  206.     
  207.   end repeat
  208.   
  209.   if activated = FALSE then exit
  210.   
  211.   set the castnum of sprite the ClickOn = the number of cast ButtonUpName
  212.   updatestage
  213.   
  214. end buttonAction
  215.  
  216.  
  217. -- ******************************************************
  218. -- Name: menuSelect
  219. -- Description: Checks the position of the mouse in a text field
  220. -- and highlights the current line.  Pass it the number of the
  221. -- text field.  The variable lineNum is used internally to
  222. -- stop looping to prevent the highlight from flashing and can
  223. -- also be used externally to pass where the mouse was when the
  224. -- user released the mouse button.
  225. --                      
  226. -- Example: menuSelect {castNumber)
  227. -- ******************************************************
  228.  
  229.  
  230. on menuSelect castNumber
  231.   
  232.   global lineNum
  233.   global bottoma
  234.   global topa
  235.   
  236.   set lineNum = 0
  237.   set hiliteSet = 0
  238.   set mousePos = 0
  239.   
  240.   -- IT IS NECESSARY TO Stop THE MOVIE DURING THIS PROCEDURE
  241.   
  242.   set the loch of sprite 46 to  -100
  243.   set the locv of sprite 46 to  -100
  244.   set the loch of sprite 47 to  -100
  245.   set the locv of sprite 47 to  -100
  246.   
  247.   --
  248.   --turn off play 
  249.   --
  250.   set the castNum of sprite (24) to 121
  251.   set the castnum of sprite 23 to 140
  252.   set the castNum of sprite (20) to 125
  253.   
  254.   updateStage
  255.   
  256.   --  stop action
  257.   global movieSpriteNum,moving
  258.   set moving=FALSE
  259.   set the movieRate of sprite movieSpriteNum to 0
  260.   
  261.   
  262.   
  263.   
  264.   
  265.   repeat while the stillDown
  266.     
  267.     if the mouseCast = the  number of cast (castNumber) then
  268.       
  269.       
  270.       if lineNum = (the mouseLine) and the mouseV = mousePos then
  271.         
  272.         nothing
  273.         
  274.       else if the mouseLine = -1 then
  275.         set the hilite of field (castNumber) to 0
  276.         set lineNum = 0
  277.         
  278.         
  279.         --     else if the mouseH > 680 then
  280.         --       set the hilite of field (castNumber) to 0
  281.         --       set lineNum = 0
  282.         --       
  283.         --     else if the mouseH < 5 then
  284.         --       set the hilite of field (castNumber) to 0
  285.         --       set lineNum = (the mouseLine)
  286.         --       
  287.         --    else if the mouseV < 13 then
  288.         --      set the hilite of field (castNumber) to 0
  289.         --      set lineNum = 0
  290.         --        
  291.         --    else if the mouseV > 400 then
  292.         --      set the hilite of field (castNumber) to 0
  293.         --      set lineNum = 0
  294.         --      
  295.         
  296.       else 
  297.         hilite line (the mouseLine) of field (castNumber)
  298.         set lineNum = (the mouseLine)
  299.         set mousePos = the mouseV
  300.         
  301.       end if
  302.       
  303.     else
  304.       set the hilite of field (castNumber) to 0
  305.       set lineNum = 0
  306.       
  307.     end if
  308.     
  309.   end repeat
  310.   
  311. end menuSelect
  312.  
  313. -- ******************************************************
  314. -- Name: putHelp
  315. -- Description: 
  316. --                      
  317. -- Example: 
  318. -- ******************************************************
  319. on putHelp castMemName,spriteNum
  320.   set hInstance = the mouseh
  321.   set vInstance = the mousev
  322.   set the castNum of sprite spriteNum to the number of cast castMemName
  323.   set the loch of sprite spriteNum to hInstance
  324.   set the locv of sprite spriteNum to vInstance
  325.   updateStage 
  326.   
  327.   repeat while the stilldown
  328.     
  329.   end repeat
  330.   
  331.   set the loch of sprite spriteNum to -300
  332.   set the loch of sprite spriteNum to -300
  333.   updateStage
  334.   
  335. end putHelp